﻿package com.giantflyingsaucer
{
	import flash.events.*;
	
	public class GFSServerEvent extends Event
	{
		public static const CONNECTED:String = "CONNECTED"; 
		public static const NOT_CONNECTED:String = "NOT_CONNECTED"; 
		public static const SESSION_TIMED_OUT:String = "SESSION_TIMED_OUT";		
		public static const CONNECTION_LIMIT_HIT:String = "CONNECTION_LIMIT_HIT";	
		
		public static const LOGIN_OK:String = "LOGIN_OK"; 		
		public static const LOGIN_ERROR_USER_ALREADY_LOGGED_IN:String = "LOGIN_ERROR_USER_ALREADY_LOGGED_IN";
		public static const LOGIN_ERROR_WRONG_PASSWORD_OR_USERNAME:String = "LOGIN_ERROR_WRONG_PASSWORD_OR_USERNAME";
		
		public static const ACCOUNT_CREATED:String = "ACCOUNT_CREATED";
		public static const ACCOUNT_STATUS:String = "ACCOUNT_STATUS";
		public static const ACCOUNT_CREATION_ERROR_USERNAME_EXISTS:String = "ACCOUNT_CREATION_ERROR_USERNAME_EXISTS";
		public static const ACCOUNT_CREATION_ERROR_UNSPECIFIED:String = "ACCOUNT_CREATION_ERROR_UNSPECIFIED";
				
		public static const INCOMING_ROOM_MESSAGE:String = "INCOMING_ROOM_MESSAGE";
		public static const INCOMING_GAME_MESSAGE:String = "INCOMING_GAME_MESSAGE";		
		public static const INCOMING_PRIVATE_MESSAGE:String = "INCOMING_PRIVATE_MESSAGE";
		public static const INCOMING_SYSTEM_BROADCAST_MESSAGE:String = "INCOMING_SYSTEM_BROADCAST_MESSAGE";
		public static const INCOMING_ROOM_LIST:String = "INCOMING_ROOM_LIST";		
		public static const INCOMING_USER_LIST:String = "INCOMING_USER_LIST";
		public static const INCOMING_USER_COUNT:String = "INCOMING_USER_COUNT";
		public static const INCOMING_DB_USERS_LIST:String = "INCOMING_DB_USERS_LIST";		
		public static const INCOMING_LAST_LOGIN_DATE:String = "INCOMING_LAST_LOGIN_DATE";				
		public static const INCOMING_USER_PROPERTY_NAMES:String = "INCOMING_USER_PROPERTY_NAMES";
		public static const INCOMING_GLOBAL_PROPERTY_NAMES:String = "INCOMING_GLOBAL_PROPERTY_NAMES";
		public static const INCOMING_USERS_IP:String = "INCOMING_USERS_IP";		
		
		public static const USER_JOINED_ROOM:String = "USER_JOINED_ROOM";
		public static const USER_LEFT_ROOM:String = "USER_LEFT_ROOM";
		public static const USER_DISCONNECTED:String = "USER_DISCONNECTED";		
		
		public static const ROOM_CREATED:String = "ROOM_CREATED";
		
		public static const READ_PROPERTY_RESULT:String = "READ_PROPERTY_RESULT";
		public static const READ_GLOBAL_PROPERTY_RESULT:String = "READ_GLOBAL_PROPERTY_RESULT";
		public static const READ_SESSION_PROPERTY_RESULT:String = "READ_SESSION_PROPERTY_RESULT";		
		
		public static const PASSWORD_CHANGED:String = "PASSWORD_CHANGED";				
		public static const PASSWORD_CHANGED_ERROR:String = "PASSWORD_CHANGED_ERROR";				
		
		public static const ERROR_IO:String = "ERROR_IO";
		public static const ERROR_SECURITY:String = "ERROR_SECURITY";
		
		public static const SERVER_VERSION:String = "SERVER_VERSION";
		public static const MAP_DATA:String = "MAP_DATA";
		public static const USERPROPERTIES:String = "USERPROPERTIES";
		public static const INCOMING_BOARD_LIST:String 		= "INCOMING_BOARD_LIST";
		
				
		
		public var username:String = "";
		public var user_message:String = "";
		public var incoming_data:String = "";
  		
  		public function GFSServerEvent(eventType:String, username:String = null, user_message:String = null, incoming_data:String = null):void
		{
			super(eventType);
			this.username = username;
			this.user_message = user_message;
			this.incoming_data = incoming_data;
		}
	}
}